Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: sendAccessLink On NULL #4828

Merged
merged 1 commit into from Apr 15, 2019

Conversation

JediKev
Copy link
Contributor

@JediKev JediKev commented Apr 3, 2019

This addresses an issue where entering a collaborator's email to send ticket email access link throws a fatal error. This is due to the method that checks for tickets with the User's email equal to the email provided. This only checks for User's emails not Collaborator emails. This adds a check for Collaborator emails as well so this will not crash out.

@@ -1079,7 +1079,7 @@ function sendAccessLink($user) {
'body' => $content->getLocalBody($lang),
), $vars);

$email->send($user, Format::striptags($msg['subj']),
$email->send($user->getEmail(), Format::striptags($msg['subj']),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any explanation for the change here? The type of user is important when creating message-id in class.mailer.php

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$user is always an object and send() needs the email address instead otherwise you run into the error substr() expects parameter 1 to be string, object given.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe that's correct statement - see send function in class.mailer.php

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I see what you mean. send() is supposed to return the email address. I will have to look deeper into why that error occurs.

This addresses an issue where entering a collaborator's email to send ticket
email access link throws a fatal error. This is due to the method that
checks for tickets with the User's email equal to the email provided. This
only checks for User's emails not Collaborator emails. This adds a check for
Collaborator emails as well so this will not crash out.
@JediKev JediKev force-pushed the issue/sendAccessLink-on-null branch from b67a7e0 to 6f9f2e1 Compare April 4, 2019 15:03
@protich protich merged commit 431fefe into osTicket:develop Apr 15, 2019
hejamu pushed a commit to physcip/osTicket that referenced this pull request Jul 20, 2019
osTicket v1.10.6

Maintenance release for osTicket 1.10

=== Enhancements
* issue: Upgrader Wrong Guide Link (osTicket#4739)
* iframe: Allow Multiple iFrame Domains (osTicket#4781)
* issue: Strip Emoticons (osTicket#4523)

=== Improvements
* issue: Maxfilesize Comma Crash (osTicket#4340)
* issue: No Save Button On Quicknotes (osTicket#4706)
* issue: PHP 7.2 Ticket Status (osTicket#4758)
* issue: Canned Response Variables (osTicket#4759)
* issue: FAQ Search Results (osTicket#4771)
* issue: FAQ Return Errors (osTicket#4772)
* issue: Duplicate Form Titles (osTicket#4788)
* issue: Organizations Users Sort (osTicket#4806)
* oops: Emojis Strip Korean (osTicket#4823)
* issue: iFrame On Install (osTicket#4824)
* issue: sendAccessLink On NULL (osTicket#4828)
* Update README.md (eccc57a, e5f4180)
* issue: iFrame Single Quotes (osTicket#4844)
* issue: .eml/.msg Attachments (osTicket#4857)

=== Performance and Security
* xss: XSS To LFI Vulnerability (osTicket#4869)
* jquery: Update Again (osTicket#4858)
JoshBeckerPLCH pushed a commit to plch/osTicket that referenced this pull request Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants